SRC_ROOT = /home/tagore/ohos/rk3568/src
TOOLCHAIN_PATH = ${SRC_ROOT}/prebuilts/clang/ohos/linux-x86_64/llvm
OUT_PATH = ${SRC_ROOT}/out/rk3568
SYS_ROOT = ${OUT_PATH}/obj/third_party/musl

uart_test: uart_test.c
	${TOOLCHAIN_PATH}/bin/clang++ \
	--target=arm-linux-ohos -march=armv7-a --sysroot=${SYS_ROOT} \
	-o uart_test uart_test.c \
	-L${SYS_ROOT}/usr/lib/arm-linux-ohos \
	-L${TOOLCHAIN_PATH}/lib/clang/12.0.1/lib/arm-linux-ohos \
	-nostdlib -lc -lc++ \
	${SYS_ROOT}/usr/lib/arm-linux-ohos/Scrt1.o ${SYS_ROOT}/usr/lib/arm-linux-ohos/crti.o
